wait_timeout = "30"
NB_lte_cmd = [
    {
        "cmd": 'ATI',
        "match": 'ATI\s{2}Manufacturer:(?:.|\n)*\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'ATE1',
        "match": 'ATE1\s{2}OK\s{2}',
    },
    {
        "cmd": 'AT+CGMI',
        "match": 'AT\+CGMI\s{2}Mlink-tech Corporation\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGMM',
        "match": 'AT\+CGMM\s{2}MK8010\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGMR',
        "match": 'AT\+CGMR\s{2}firmware:(?:.|\n)*\s{6}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGSN=?',
        "match": 'AT\+CGSN=\?\s{2}\+CGSN:\(0,1,2,3\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGSN',
        "match": 'AT\+CGSN\s{2}\+CGSN:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGSN=0',
        "match": 'AT\+CGSN=0\s{2}\+CGSN:\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGSN=1',
        "match": 'AT\+CGSN=1\s{2}\+CGSN:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGSN=2',
        "match": 'AT\+CGSN=2\s{2}\+CGSN:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGSN=3',
        "match": 'AT\+CGSN=3\s{2}\+CGSN:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CEREG=?',
        "match": 'AT\+CEREG=\?\s{2}\+CEREG:\(0-2,4\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CEREG=2',
    #     "match": 'AT\+CEREG=2\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CEREG?',
        "match": 'AT\+CEREG\?\s{2}\+CEREG:\d,\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CEREG=0',
    #     "match": 'AT\+CEREG=0\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CSCON=?',
        "match": 'AT\+CSCON=\?\s{2}\+CSCON:\(0,1\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CSCON=1',
        "match": 'AT\+CSCON=1\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CSCON?',
        "match": 'AT\+CSCON\?\s{2}\+CSCON:\d,\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CSCON=0',
    #     "match": 'AT\+CSCON=0\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CSQ=?',
        "match": 'AT\+CSQ=\?\s{2}\+CSQ:\(0...31,99\),\(0...7,99\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CSQ',
        "match": 'AT\+CSQ\s{2}\+CSQ:\d+,99\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGPADDR=?',
        "match": 'AT\+CGPADDR=\?\s{2}\+CGPADDR:\(1\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGPADDR=1',
        "match": 'AT\+CGPADDR=1\s{2}\+CGPADDR:\d,[\.\d]+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CGACT=1,1',
    #     "match": 'AT\+CGACT=1,1\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CGACT?',
        "match": 'AT\+CGACT\?\s{2}\+CGACT:\d,\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGACT=?',
        "match": 'AT\+CGACT=\?\s{2}\+CGACT:\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGDCONT=1,"IP","huawei.com"',
        "match": 'AT\+CGDCONT=1,"IP","huawei.com"\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGDCONT?',
        "match": 'AT\+CGDCONT\?\s{2}\+CGDCONT:\d,"\w+","[\.\w]+"\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CGDCONT=?',
    #     "match": 'AT\+CGDCONT=\?\s{2}\+CGDCONT:\(\d-\d\),"\w+",""\n\+CGDCONT:\([\d-\d\),"\w+",""\n\+CGDCONT:\([\d-\d\),"\w+",""\n\s{4}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CGCONTRDP',
        "match": 'AT\+CGCONTRDP\s{2}\+CGCONTRDP:\d,\d,[\.\w]+,[\.\w]+,,[\.\w]+,[\.\w]+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGCONTRDP=?',
        "match": 'AT\+CGCONTRDP=\?\s{2}\+CGCONTRDP:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+COPS=2',
        "match": 'AT\+COPS=2\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+COPS=0',
        "match": 'AT\+COPS=0\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+COPS?',
        "match": 'AT\+COPS\?\s{2}\+COPS:\d,\d,"\d+",\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+COPS=?',
    #     "match": 'AT\+COPS=\?\s{2}\+COPS:\(\d,"[\w\-]+,"\),,\(\d-\d\),\(\d-\d\)\s{4}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    # {
    #     "cmd": 'AT+CGATT=1',
    #     "match": 'AT\+CGATT=1\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CGATT=0',
        "match": 'AT\+CGATT=0\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGATT?',
        "match": 'AT\+CGATT\?\s{2}\+CGATT:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CGATT=?',
        "match": 'AT\+CGATT=\?\s{2}\+CGATT:\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CIMI',
        "match": 'AT\+CIMI\s{2}\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CFUN=0',
    #     "match": 'AT\+CFUN=0\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    # {
    #     "cmd": 'AT+CFUN=1',
    #     "match": 'AT\+CFUN=1\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CFUN?',
        "match": 'AT\+CFUN\?\s{2}\+CFUN:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CFUN=?',
        "match": 'AT\+CFUN=\?\s{2}\+CFUN:\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMEE=2',
        "match": 'AT\+CMEE=2\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMEE=1',
        "match": 'AT\+CMEE=1\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMEE?',
        "match": 'AT\+CMEE\?\s{2}\+CMEE:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CMEE=?',
    #     "match": 'AT\+CMEE=\?\s{2}+CMEE:\(\d\-\d\?,\d)s{4}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CCLK?',
        "match": 'AT\+CCLK\?\s{2}\+CCLK:\d+/\d+/\d+,\d+:\d+:\d+\+\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CCLK=?',
        "match": 'AT\+CCLK=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CTZR?',
        "match": 'AT\+CTZR\?\s{2}\+CTZR:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CTZR=?',
        "match": 'AT\+CTZR=\?\s{2}\+CTZR:\(\d-\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CPSMS=1,,,"10100101","00100001"',
    #     "match": 'AT\+CPSMS=1,,,"10100101","00100001"\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    # {
    #     "cmd": 'AT+CPSMS=0',
    #     "match": 'AT\+CPSMS=0\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CPSMS?',
        "match": 'AT\+CPSMS\?\s{2}\+CPSMS:\d+,,,\d+,\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+CPSMS=?',
    #     "match": 'AT\+CPSMS=\?\s{2}\+CPSMS:\(\d-\d\),,,\(\d+\-\d+\),(\d+-\d+\)\s{4}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+CEDRXS=1,5,"0011"',
        "match": 'AT\+CEDRXS=1,5,"0011"\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CEDRXS?',
        "match": 'AT\+CEDRXS\?\s{2}\+CEDRXS:\d+,"\d+"\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CEDRXS=?',
        "match": 'AT\+CEDRXS=\?\s{2}\+CEDRXS:\(\d-\d\),\(\d\),\("\d+"-"\d+"\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CEDRXRDP',
        "match": 'AT\+CEDRXRDP\s{2}\+CEDRXRDP:\d,"\d+","\d+","\d+"\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CEDRXRDP=?',
        "match": 'AT\+CEDRXRDP=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CSIM=?',
        "match": 'AT\+CSIM=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CRSM=176,28643,0,0,18',
        "match": 'AT\+CRSM=176,28643,0,0,18\s{2}\+CRSM:\d+,\d+,\w+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CRSM=?',
        "match": 'AT\+CRSM=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CSODCP=?',
        "match": 'AT\+CSODCP=\?\s{2}\+CSODCP:\(\d-\d+\),\(\d-\d+\),\(\d-\d+\),\(\d,\d+\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+IPR=115200',
    #     "match": 'AT\+IPR=115200\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+IPR?',
        "match": 'AT\+IPR\?\s{2}\+IPR:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMGF=1',
        "match": 'AT\+CMGF=1\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMGF=0',
        "match": 'AT\+CMGF=0\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMGF?',
        "match": 'AT\+CMGF\?\s{2}\+CMGF:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMGF=?',
        "match": 'AT\+CMGF=\?\s{2}\+CMGF:\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CSCA="+8613800210500",145',
        "match": 'AT\+CSCA="\+8613800210500",145\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CSCA?',
        "match": 'AT\+CSCA\?\s{2}\+CSCA:"[\+\d]+",\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CSCA=?',
        "match": 'AT\+CSCA=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMGL=?',
        "match": 'AT\+CMGL=\?\s{2}\+CMGL:\(\d-\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+CMGS=?',
        "match": 'AT\+CMGS=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+ICCID',
        "match": 'AT\+ICCID\s{2}\+ICCID:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKOPEN=1,2,10.0.1.55,50735,5000,2',
        "match": 'AT\+MKOPEN=1,2,10.0.1.55,50735,5000,2\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKOPEN?',
        "match": 'AT\+MKOPEN\?\s{2}\+MKOPEN:\d+,\d+,[\.\d]+,\d+,\d+,\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKOPEN=?',
        "match": 'AT\+MKOPEN=\?\s{2}\+MKOPEN:\(\d-\d\),\(\d-\d\),<[\w\_]+>,<[\w\_]+>,<[\w\_]+>\[,<[\w\_]+>\]\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+MKUDPSEND=1,1234',
    #     "match": 'AT\+MKUDPSEND=1,1234\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+MKUDPSEND=?',
        "match": 'AT\+MKUDPSEND=\?\s{2}\+MKUDPSEND:\(\d-\d\),<\w+>,\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKRECEIVE=?',
        "match": 'AT\+MKRECEIVE=\?\s{2}\+MKRECEIVE:\(\d-\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKTCPSEND=?',
        "match": 'AT\+MKTCPSEND=\?\s{2}\+MKTCPSEND:\(\d-\d\),<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKCLOSE=1',
        "match": 'AT\+MKCLOSE=1\s{2}\+MKCLOSE:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKCLOSE?',
        "match": 'AT\+MKCLOSE\?\s{2}\+MKCLOSE:\(\w+,\d\),\(\w+,\d\),\(\w+,\d\),\(\w+,\d\),\(\w+,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKCLOSE=?',
        "match": 'AT\+MKCLOSE=\?\s{2}\+MKCLOSE:\(\d-\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKDATTYPE=1',
        "match": 'AT\+MKDATTYPE=1\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKDATTYPE?',
        "match": 'AT\+MKDATTYPE\?\s{2}\+MKDATTYPE:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKDATTYPE=?',
        "match": 'AT\+MKDATTYPE=\?\s{2}\+MKDATTYPE:\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKPING=?',
        "match": 'AT\+MKPING=\?\s{2}\+MKPING:<[\w\_]+>,\(\d-\d+\),\(\d+-\d+\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+MKBAND=8',
    #     "match": 'AT\+MKBAND=8\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+MKBAND?',
        "match": 'AT\+MKBAND\?\s{2}\+MKBAND:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKBAND=?',
        "match": 'AT\+MKBAND=\?\s{2}\+MKBAND:\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKBAUDRATE=115200,1',
        "match": 'AT\+MKBAUDRATE=115200,1\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKBAUDRATE?',
        "match": 'AT\+MKBAUDRATE\?\s{2}\+MKBAUDRATE:\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKBAUDRATE=?',
        "match": 'AT\+MKBAUDRATE=\?\s{2}\+MKBAUDRATE:\(\d+,\d+,\d+,\d+\),\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+MKEDRXPTWS=1,5,"0011","0001"',
    #     "match": 'AT\+MKEDRXPTWS=1,5,"0011","0001"\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    # {
    #     "cmd": 'AT+MKEDRXPTWS=0',
    #     "match": 'AT\+MKEDRXPTWS=0\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+MKEDRXPTWS?',
        "match": 'AT\+MKEDRXPTWS\?\s{2}\+MKEDRXPTWS:\d,"\d+","\d+"\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKEDRXPTWS=?',
        "match": 'AT\+MKEDRXPTWS=\?\s{2}\+MKEDRXPTWS:\(\d-\d\),\(\d\),\("\d+"-"\d+"\),\("\d+"-"\d+"\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+MKSEND=1',
    #     "match": 'AT\+MKSEND=1\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    # {
    #     "cmd": 'AT+MKSEND=2',
    #     "match": 'AT\+MKSEND=2\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    # {
    #     "cmd": 'AT+MKSEND=0',
    #     "match": 'AT\+MKSEND=0\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+MKSEND?',
        "match": 'AT\+MKSEND\?\s{2}\+MKSEND:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKSEND=?',
        "match": 'AT\+MKSEND=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKVES',
        "match": 'AT\+MKVES\s{2}[\_\w\.]+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKUESTATS',
        "match": 'AT\+MKUESTATS\s{2}(?:.|\n)*\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKNCCCONF=0,4,7',
        "match": 'AT\+MKNCCCONF=0,4,7\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKNCCCONF?',
        "match": 'AT\+MKNCCCONF\?\s{2}\+MKNCCCONF:\d,\d,\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKNCCCONF=?',
        "match": 'AT\+MKNCCCONF=\?\s{2}\+MKNCCCONF:\(<\w>\[,<\w>\[,<\w>\[\.\.\.\]\]\]\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKEARFCN=1,1,2610',
        "match": 'AT\+MKEARFCN=1,1,2610\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKEARFCN=0',
        "match": 'AT\+MKEARFCN=0\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKEARFCN?',
        "match": 'AT\+MKEARFCN\?\s{2}\+MKEARFCN:\d,\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKEARFCN=?',
        "match": 'AT\+MKEARFCN=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+MKCELLLOCK=1,3798,6',
    #     "match": 'AT\+MKCELLLOCK=1,3798,6\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+MKCELLLOCK?',
        "match": 'AT\+MKCELLLOCK\?\s{2}\+MKCELLLOCK:\d+,\d+,\d+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKCELLLOCK=?',
        "match": 'AT\+MKCELLLOCK=\?\s{2}\+MKCELLLOCK:<\w+>,<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+MKPSMR=1',
    #     "match": 'AT\+MKPSMR=1\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+MKPSMR?',
        "match": 'AT\+MKPSMR\?\s{2}\+MKPSMR:\d\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKPSMR=0',
        "match": 'AT\+MKPSMR=0\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKPSMR=?',
        "match": 'AT\+MKPSMR=\?\s{2}\+MKPSMR:\(\d,\d\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # {
    #     "cmd": 'AT+MKCSEARFCN',
    #     "match": 'AT\+MKCSEARFCN\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    {
        "cmd": 'AT+MKCSEARFCN=?',
        "match": 'AT\+MKCSEARFCN=\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKRB',
        "match": 'AT\+MKRB\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKDNS=1,218.2.2.2',
        "match": 'AT\+MKDNS=1,218.2.2.2\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKDNS?',
        "match": 'AT\+MKDNS\?\s{2}\+MKDNS:\d,[\w\.]+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    {
        "cmd": 'AT+MKDNS=?',
        "match": 'AT\+MKDNS=\?\s{2}\+MKDNS:\(\d-\d\),\([\w\_]+\),\([\w\_]+\)\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    # { 
    #     "cmd": 'AT+MKNTP=0',
    #     "match": 'AT\+MKNTP=0\s{2}OK\s{2}',
    #     "wait": b'OK',
    #     "timeout": wait_timeout
    # },
    { 
        "cmd": 'AT+MKNTP=1',
        "match": 'AT\+MKNTP=1\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    { 
        "cmd": 'AT+MKNTP?',
        "match": 'AT\+MKNTP\?\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    { 
        "cmd": 'AT+MKNTP=?',
        "match": 'AT\+MKNTP=\?\s{2}\+MKNTP:<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    { 
        "cmd": 'AT+MKULRATE=0',
        "match": 'AT\+MKULRATE=0\s{2}\+MKULRATE:\w+\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    { 
        "cmd": 'AT+MKULRATE=?',
        "match": 'AT\+MKULRATE=\?\s{2}\+MKULRATE:<\w+>,<\w+>,<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    { 
        "cmd": 'AT+MKRATESHOW=0,1',
        "match": 'AT\+MKRATESHOW=0,1\s{2}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
    { 
        "cmd": 'AT+MKRATESHOW=?',
        "match": 'AT\+MKRATESHOW=\?\s{2}\+MKRATESHOW:<\w+>,<\w+>\s{4}OK\s{2}',
        "wait": b'OK',
        "timeout": wait_timeout
    },
]